<?php

namespace App\Http\Resources;

use App\Helpers\BaseResource;
use App\Helpers\FileTool;

class QrPoster extends BaseResource
{
    public function toArray($request)
    {
        return $this->filterFields([
            'name'=>$this->name,
            'id' => hashid_encode($this->id),
            'type' => $this->type,
            'url' => FileTool::thumb($this->path),
            'avatar' => FileTool::thumb($this->cover, 'imageView2/1/w/120/h/120/q/100'),
        ]);
    }
}
